package logic

import (
	"github.com/gin-gonic/gin"
	"github.com/vueadmin/app/admin/internal/service"
	"github.com/vueadmin/app/admin/internal/svc"
)

type baseconfigLogic struct{
	ctx    *gin.Context
	svcCtx *svc.ServiceContext
}

func NewBaseconfigLogic(ctx *gin.Context, svcCtx *svc.ServiceContext) *baseconfigLogic {
	return &baseconfigLogic{
		ctx: ctx,
		svcCtx: svcCtx,
	}
}

/**
 * @description(配置表单)
 * @buildcode(true)
*/
func (p baseconfigLogic) Index() (map[string]interface{}, error) {
	s := service.NewBaseconfigService(p.svcCtx)
	return s.Index()
}

/**
 * @description(更新表单)
 * @buildcode(true)
*/
func (p baseconfigLogic) Update(req map[string]interface{}) error {
	s := service.NewBaseconfigService(p.svcCtx)
	return s.Update(req)
}

